﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using IDAL;
using Model;

namespace Factory
{
    public class CreateFactory
    {
        public static IAddress GetAddress()
        {
            return (IAddress)Assembly.Load("DAL").CreateInstance("DAL.D_Address");
        }
        public static IAccount GetAccount()
        {
            return (IAccount)Assembly.Load("DAL").CreateInstance("DAL.D_Account");
        }
        public static ICategory GetCategory()
        {
            return (ICategory)Assembly.Load("DAL").CreateInstance("DAL.D_Category");
        }
        public static ICollect GetCollect()
        {
            return (ICollect)Assembly.Load("DAL").CreateInstance("DAL.D_Collect");
        }
        public static ICustomer GetCustomer()
        {
            return (ICustomer)Assembly.Load("DAL").CreateInstance("DAL.D_Customer");
        }
        public static IGoods GetGoods()
        {
            return (IGoods)Assembly.Load("DAL").CreateInstance("DAL.D_Goods");
        }
        public static IGoodsDetails GetGoodsDetails()
        {
            return (IGoodsDetails)Assembly.Load("DAL").CreateInstance("DAL.D_GoodsDetails");
        }
        public static ILayer GetLayer()
        {
            return (ILayer)Assembly.Load("DAL").CreateInstance("DAL.D_Layer");
        }
        public static IOrder GetOrder()
        {
            return (IOrder)Assembly.Load("DAL").CreateInstance("DAL.D_Order");
        }
        public static IOrderDetails GetOrderDetails()
        {
            return (IOrderDetails)Assembly.Load("DAL").CreateInstance("DAL.D_OrderDetails");
        }
        public static IShape GetShape()
        {
            return (IShape)Assembly.Load("DAL").CreateInstance("DAL.D_Shape");
        }
        public static IShoppingCart GetShoppingCart()
        {
            return (IShoppingCart)Assembly.Load("DAL").CreateInstance("DAL.D_ShoppingCart");
        }
        public static ISize GetSize()
        {
            return (ISize)Assembly.Load("DAL").CreateInstance("DAL.D_Size");
        }
        public static ITaste GetTaste()
        {
            return (ITaste)Assembly.Load("DAL").CreateInstance("DAL.D_Taste");
        }
    }
}
